package jsyf.oa.entity.apply;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author: 徐波
 * @creat: 2017/11/30 0030 19:16
 * description:
 */
@Entity
@Table(name = "T_APL_MONEY_PAYEE", schema = "oa", catalog = "")
public class MoneyPayeeEntity extends BaseEntity {
    private String fkMoneyId;
    private String payeeName;
    private String payeeType;
    private BigDecimal payeeMoney;
    private String offTheWay;
    private String offTime;
    private String bankName;
    private String bankCardNumber;
    private String payeeMoneyChinese;
    private Integer sortNo;


    @Basic
    @Column(name = "FK_MONDY_ID")
    public String getFkMoneyId() {
        return fkMoneyId;
    }

    public void setFkMoneyId(String fkMoneyId) {
        this.fkMoneyId = fkMoneyId;
    }


    @Basic
    @Column(name = "PAYEE_NAME")
    public String getPayeeName() {
        return payeeName;
    }

    public void setPayeeName(String payeeName) {
        this.payeeName = payeeName;
    }

    @Basic
    @Column(name = "PAYEE_TYPE")
    public String getPayeeType() {
        return payeeType;
    }

    public void setPayeeType(String payeeType) {
        this.payeeType = payeeType;
    }

    @Basic
    @Column(name = "PAYEE_MONEY")
    public BigDecimal getPayeeMoney() {
        return payeeMoney;
    }

    public void setPayeeMoney(BigDecimal payeeMoney) {
        this.payeeMoney = payeeMoney;
    }

    @Basic
    @Column(name = "OFF_THE_WAY")
    public String getOffTheWay() {
        return offTheWay;
    }

    public void setOffTheWay(String offTheWay) {
        this.offTheWay = offTheWay;
    }

    @Basic
    @Column(name = "OFF_TIME")
    public String getOffTime() {
        return offTime;
    }

    public void setOffTime(String offTime) {
        this.offTime = offTime;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankCardNumber() {
        return bankCardNumber;
    }

    public void setBankCardNumber(String bankCardNumber) {
        this.bankCardNumber = bankCardNumber;
    }

    public String getPayeeMoneyChinese() {
        return payeeMoneyChinese;
    }

    public void setPayeeMoneyChinese(String payeeMoneyChinese) {
        this.payeeMoneyChinese = payeeMoneyChinese;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", id);
        obj.put("FK_MONEY_ID", fkMoneyId);
        obj.put("PAYEE_NAME", payeeName);
        obj.put("PAYEE_TYPE", payeeType);
        obj.put("PAYEE_MONEY", payeeMoney);
        obj.put("OFF_THE_WAY", offTheWay);
        obj.put("OFF_TIME", offTime);
        obj.put("BANK_NAME", bankName);
        obj.put("BANK_CARD_NUMBER", bankCardNumber);
        obj.put("PAYEE_MONEY_CHINESE", this.getPayeeMoneyChinese());
        obj.put("SORT_NO", this.getSortNo());
        obj.put("UPDATE_USER_ID", getUpdateUserId());
        obj.put("UPDATE_TIME", getUpdateTime());
        return obj;
    }

    @Override
    public String getTableName() {
        return "T_APL_MONEY_PAYEE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("FK_MONEY_ID", "fkMoneyId");
        obj.put("PAYEE_NAME", "payeeName");
        obj.put("PAYEE_TYPE", "payeeType");
        obj.put("PAYEE_MONEY", "payeeMoney");
        obj.put("OFF_THE_WAY", "offTheWay");
        obj.put("OFF_TIME", "offTime");
        obj.put("BANK_NAME", "bankName");
        obj.put("BANK_CARD_NUMBER", "bankCardNumber");
        obj.put("PAYEE_MONEY_CHINESE", "payeeMoneyChinese");
        obj.put("SORT_NO", "sortNo");
        obj.put("UPDATE_USER_ID", "updateUserId");
        obj.put("UPDATE_TIME", "updateTime");
        return obj;
    }
}
